{"ast":null,"code":"import _slicedToArray from \"/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/@babel/runtime/helpers/esm/slicedToArray.js\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nvar _excluded = [\"onChange\", \"maxRows\", \"minRows\", \"style\", \"value\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { flushSync } from 'react-dom';\nimport { unstable_debounce as debounce, unstable_useForkRef as useForkRef, unstable_useEnhancedEffect as useEnhancedEffect, unstable_ownerWindow as ownerWindow } from '@mui/utils';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction getStyleValue(computedStyle, property) {\n  return parseInt(computedStyle[property], 10) || 0;\n}\nvar styles = {\n  shadow: {\n    // Visibility needed to hide the extra text area on iPads\n    visibility: 'hidden',\n    // Remove from the content flow\n    position: 'absolute',\n    // Ignore the scrollbar width\n    overflow: 'hidden',\n    height: 0,\n    top: 0,\n    left: 0,\n    // Create a new layer, increase the isolation of the computed values\n    transform: 'translateZ(0)'\n  }\n};\nfunction isEmpty(obj) {\n  return obj === undefined || obj === null || Object.keys(obj).length === 0;\n}\nvar TextareaAutosize = /*#__PURE__*/React.forwardRef(function TextareaAutosize(props, ref) {\n  var onChange = props.onChange,\n    maxRows = props.maxRows,\n    _props$minRows = props.minRows,\n    minRows = _props$minRows === void 0 ? 1 : _props$minRows,\n    style = props.style,\n    value = props.value,\n    other = _objectWithoutPropertiesLoose(props, _excluded);\n  var _React$useRef = React.useRef(value != null),\n    isControlled = _React$useRef.current;\n  var inputRef = React.useRef(null);\n  var handleRef = useForkRef(ref, inputRef);\n  var shadowRef = React.useRef(null);\n  var renders = React.useRef(0);\n  var _React$useState = React.useState({}),\n    _React$useState2 = _slicedToArray(_React$useState, 2),\n    state = _React$useState2[0],\n    setState = _React$useState2[1];\n  var getUpdatedState = React.useCallback(function () {\n    var input = inputRef.current;\n    var containerWindow = ownerWindow(input);\n    var computedStyle = containerWindow.getComputedStyle(input); // If input's width is shrunk and it's not visible, don't sync height.\n\n    if (computedStyle.width === '0px') {\n      return {};\n    }\n    var inputShallow = shadowRef.current;\n    inputShallow.style.width = computedStyle.width;\n    inputShallow.value = input.value || props.placeholder || 'x';\n    if (inputShallow.value.slice(-1) === '\\n') {\n      // Certain fonts which overflow the line height will cause the textarea\n      // to report a different scrollHeight depending on whether the last line\n      // is empty. Make it non-empty to avoid this issue.\n      inputShallow.value += ' ';\n    }\n    var boxSizing = computedStyle['box-sizing'];\n    var padding = getStyleValue(computedStyle, 'padding-bottom') + getStyleValue(computedStyle, 'padding-top');\n    var border = getStyleValue(computedStyle, 'border-bottom-width') + getStyleValue(computedStyle, 'border-top-width'); // The height of the inner content\n\n    var innerHeight = inputShallow.scrollHeight; // Measure height of a textarea with a single row\n\n    inputShallow.value = 'x';\n    var singleRowHeight = inputShallow.scrollHeight; // The height of the outer content\n\n    var outerHeight = innerHeight;\n    if (minRows) {\n      outerHeight = Math.max(Number(minRows) * singleRowHeight, outerHeight);\n    }\n    if (maxRows) {\n      outerHeight = Math.min(Number(maxRows) * singleRowHeight, outerHeight);\n    }\n    outerHeight = Math.max(outerHeight, singleRowHeight); // Take the box sizing into account for applying this value as a style.\n\n    var outerHeightStyle = outerHeight + (boxSizing === 'border-box' ? padding + border : 0);\n    var overflow = Math.abs(outerHeight - innerHeight) <= 1;\n    return {\n      outerHeightStyle: outerHeightStyle,\n      overflow: overflow\n    };\n  }, [maxRows, minRows, props.placeholder]);\n  var updateState = function updateState(prevState, newState) {\n    var outerHeightStyle = newState.outerHeightStyle,\n      overflow = newState.overflow; // Need a large enough difference to update the height.\n    // This prevents infinite rendering loop.\n\n    if (renders.current < 20 && (outerHeightStyle > 0 && Math.abs((prevState.outerHeightStyle || 0) - outerHeightStyle) > 1 || prevState.overflow !== overflow)) {\n      renders.current += 1;\n      return {\n        overflow: overflow,\n        outerHeightStyle: outerHeightStyle\n      };\n    }\n    if (process.env.NODE_ENV !== 'production') {\n      if (renders.current === 20) {\n        console.error(['MUI: Too many re-renders. The layout is unstable.', 'TextareaAutosize limits the number of renders to prevent an infinite loop.'].join('\\n'));\n      }\n    }\n    return prevState;\n  };\n  var syncHeight = React.useCallback(function () {\n    var newState = getUpdatedState();\n    if (isEmpty(newState)) {\n      return;\n    }\n    setState(function (prevState) {\n      return updateState(prevState, newState);\n    });\n  }, [getUpdatedState]);\n  var syncHeightWithFlushSycn = function syncHeightWithFlushSycn() {\n    var newState = getUpdatedState();\n    if (isEmpty(newState)) {\n      return;\n    } // In React 18, state updates in a ResizeObserver's callback are happening after the paint which causes flickering\n    // when doing some visual updates in it. Using flushSync ensures that the dom will be painted after the states updates happen\n    // Related issue - https://github.com/facebook/react/issues/24331\n\n    flushSync(function () {\n      setState(function (prevState) {\n        return updateState(prevState, newState);\n      });\n    });\n  };\n  React.useEffect(function () {\n    var handleResize = debounce(function () {\n      renders.current = 0; // If the TextareaAutosize component is replaced by Suspense with a fallback, the last\n      // ResizeObserver's handler that runs because of the change in the layout is trying to\n      // access a dom node that is no longer there (as the fallback component is being shown instead).\n      // See https://github.com/mui/material-ui/issues/32640\n\n      if (inputRef.current) {\n        syncHeightWithFlushSycn();\n      }\n    });\n    var containerWindow = ownerWindow(inputRef.current);\n    containerWindow.addEventListener('resize', handleResize);\n    var resizeObserver;\n    if (typeof ResizeObserver !== 'undefined') {\n      resizeObserver = new ResizeObserver(handleResize);\n      resizeObserver.observe(inputRef.current);\n    }\n    return function () {\n      handleResize.clear();\n      containerWindow.removeEventListener('resize', handleResize);\n      if (resizeObserver) {\n        resizeObserver.disconnect();\n      }\n    };\n  });\n  useEnhancedEffect(function () {\n    syncHeight();\n  });\n  React.useEffect(function () {\n    renders.current = 0;\n  }, [value]);\n  var handleChange = function handleChange(event) {\n    renders.current = 0;\n    if (!isControlled) {\n      syncHeight();\n    }\n    if (onChange) {\n      onChange(event);\n    }\n  };\n  return /*#__PURE__*/_jsxs(React.Fragment, {\n    children: [/*#__PURE__*/_jsx(\"textarea\", _extends({\n      value: value,\n      onChange: handleChange,\n      ref: handleRef // Apply the rows prop to get a \"correct\" first SSR paint\n      ,\n\n      rows: minRows,\n      style: _extends({\n        height: state.outerHeightStyle,\n        // Need a large enough difference to allow scrolling.\n        // This prevents infinite rendering loop.\n        overflow: state.overflow ? 'hidden' : null\n      }, style)\n    }, other)), /*#__PURE__*/_jsx(\"textarea\", {\n      \"aria-hidden\": true,\n      className: props.className,\n      readOnly: true,\n      ref: shadowRef,\n      tabIndex: -1,\n      style: _extends({}, styles.shadow, style, {\n        padding: 0\n      })\n    })]\n  });\n});\nprocess.env.NODE_ENV !== \"production\" ? TextareaAutosize.propTypes\n/* remove-proptypes */ = {\n  // ----------------------------- Warning --------------------------------\n  // | These PropTypes are generated from the TypeScript type definitions |\n  // |     To update them edit the d.ts file and run \"yarn proptypes\"     |\n  // ----------------------------------------------------------------------\n\n  /**\n   * @ignore\n   */\n  className: PropTypes.string,\n  /**\n   * Maximum number of rows to display.\n   */\n  maxRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n  /**\n   * Minimum number of rows to display.\n   * @default 1\n   */\n  minRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n  /**\n   * @ignore\n   */\n  onChange: PropTypes.func,\n  /**\n   * @ignore\n   */\n  placeholder: PropTypes.string,\n  /**\n   * @ignore\n   */\n  style: PropTypes.object,\n  /**\n   * @ignore\n   */\n  value: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.number, PropTypes.string])\n} : void 0;\nexport default TextareaAutosize;","map":{"version":3,"names":["_extends","_objectWithoutPropertiesLoose","_excluded","React","PropTypes","flushSync","unstable_debounce","debounce","unstable_useForkRef","useForkRef","unstable_useEnhancedEffect","useEnhancedEffect","unstable_ownerWindow","ownerWindow","jsx","_jsx","jsxs","_jsxs","getStyleValue","computedStyle","property","parseInt","styles","shadow","visibility","position","overflow","height","top","left","transform","isEmpty","obj","undefined","Object","keys","length","TextareaAutosize","forwardRef","props","ref","onChange","maxRows","minRows","style","value","other","useRef","isControlled","current","inputRef","handleRef","shadowRef","renders","useState","state","setState","getUpdatedState","useCallback","input","containerWindow","getComputedStyle","width","inputShallow","placeholder","slice","boxSizing","padding","border","innerHeight","scrollHeight","singleRowHeight","outerHeight","Math","max","Number","min","outerHeightStyle","abs","updateState","prevState","newState","process","env","NODE_ENV","console","error","join","syncHeight","syncHeightWithFlushSycn","useEffect","handleResize","addEventListener","resizeObserver","ResizeObserver","observe","clear","removeEventListener","disconnect","handleChange","event","Fragment","children","rows","className","readOnly","tabIndex","propTypes","string","oneOfType","number","func","object","arrayOf"],"sources":["/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/@mui/base/TextareaAutosize/TextareaAutosize.js"],"sourcesContent":["import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"onChange\", \"maxRows\", \"minRows\", \"style\", \"value\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { flushSync } from 'react-dom';\nimport { unstable_debounce as debounce, unstable_useForkRef as useForkRef, unstable_useEnhancedEffect as useEnhancedEffect, unstable_ownerWindow as ownerWindow } from '@mui/utils';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\n\nfunction getStyleValue(computedStyle, property) {\n  return parseInt(computedStyle[property], 10) || 0;\n}\n\nconst styles = {\n  shadow: {\n    // Visibility needed to hide the extra text area on iPads\n    visibility: 'hidden',\n    // Remove from the content flow\n    position: 'absolute',\n    // Ignore the scrollbar width\n    overflow: 'hidden',\n    height: 0,\n    top: 0,\n    left: 0,\n    // Create a new layer, increase the isolation of the computed values\n    transform: 'translateZ(0)'\n  }\n};\n\nfunction isEmpty(obj) {\n  return obj === undefined || obj === null || Object.keys(obj).length === 0;\n}\n\nconst TextareaAutosize = /*#__PURE__*/React.forwardRef(function TextareaAutosize(props, ref) {\n  const {\n    onChange,\n    maxRows,\n    minRows = 1,\n    style,\n    value\n  } = props,\n        other = _objectWithoutPropertiesLoose(props, _excluded);\n\n  const {\n    current: isControlled\n  } = React.useRef(value != null);\n  const inputRef = React.useRef(null);\n  const handleRef = useForkRef(ref, inputRef);\n  const shadowRef = React.useRef(null);\n  const renders = React.useRef(0);\n  const [state, setState] = React.useState({});\n  const getUpdatedState = React.useCallback(() => {\n    const input = inputRef.current;\n    const containerWindow = ownerWindow(input);\n    const computedStyle = containerWindow.getComputedStyle(input); // If input's width is shrunk and it's not visible, don't sync height.\n\n    if (computedStyle.width === '0px') {\n      return {};\n    }\n\n    const inputShallow = shadowRef.current;\n    inputShallow.style.width = computedStyle.width;\n    inputShallow.value = input.value || props.placeholder || 'x';\n\n    if (inputShallow.value.slice(-1) === '\\n') {\n      // Certain fonts which overflow the line height will cause the textarea\n      // to report a different scrollHeight depending on whether the last line\n      // is empty. Make it non-empty to avoid this issue.\n      inputShallow.value += ' ';\n    }\n\n    const boxSizing = computedStyle['box-sizing'];\n    const padding = getStyleValue(computedStyle, 'padding-bottom') + getStyleValue(computedStyle, 'padding-top');\n    const border = getStyleValue(computedStyle, 'border-bottom-width') + getStyleValue(computedStyle, 'border-top-width'); // The height of the inner content\n\n    const innerHeight = inputShallow.scrollHeight; // Measure height of a textarea with a single row\n\n    inputShallow.value = 'x';\n    const singleRowHeight = inputShallow.scrollHeight; // The height of the outer content\n\n    let outerHeight = innerHeight;\n\n    if (minRows) {\n      outerHeight = Math.max(Number(minRows) * singleRowHeight, outerHeight);\n    }\n\n    if (maxRows) {\n      outerHeight = Math.min(Number(maxRows) * singleRowHeight, outerHeight);\n    }\n\n    outerHeight = Math.max(outerHeight, singleRowHeight); // Take the box sizing into account for applying this value as a style.\n\n    const outerHeightStyle = outerHeight + (boxSizing === 'border-box' ? padding + border : 0);\n    const overflow = Math.abs(outerHeight - innerHeight) <= 1;\n    return {\n      outerHeightStyle,\n      overflow\n    };\n  }, [maxRows, minRows, props.placeholder]);\n\n  const updateState = (prevState, newState) => {\n    const {\n      outerHeightStyle,\n      overflow\n    } = newState; // Need a large enough difference to update the height.\n    // This prevents infinite rendering loop.\n\n    if (renders.current < 20 && (outerHeightStyle > 0 && Math.abs((prevState.outerHeightStyle || 0) - outerHeightStyle) > 1 || prevState.overflow !== overflow)) {\n      renders.current += 1;\n      return {\n        overflow,\n        outerHeightStyle\n      };\n    }\n\n    if (process.env.NODE_ENV !== 'production') {\n      if (renders.current === 20) {\n        console.error(['MUI: Too many re-renders. The layout is unstable.', 'TextareaAutosize limits the number of renders to prevent an infinite loop.'].join('\\n'));\n      }\n    }\n\n    return prevState;\n  };\n\n  const syncHeight = React.useCallback(() => {\n    const newState = getUpdatedState();\n\n    if (isEmpty(newState)) {\n      return;\n    }\n\n    setState(prevState => {\n      return updateState(prevState, newState);\n    });\n  }, [getUpdatedState]);\n\n  const syncHeightWithFlushSycn = () => {\n    const newState = getUpdatedState();\n\n    if (isEmpty(newState)) {\n      return;\n    } // In React 18, state updates in a ResizeObserver's callback are happening after the paint which causes flickering\n    // when doing some visual updates in it. Using flushSync ensures that the dom will be painted after the states updates happen\n    // Related issue - https://github.com/facebook/react/issues/24331\n\n\n    flushSync(() => {\n      setState(prevState => {\n        return updateState(prevState, newState);\n      });\n    });\n  };\n\n  React.useEffect(() => {\n    const handleResize = debounce(() => {\n      renders.current = 0; // If the TextareaAutosize component is replaced by Suspense with a fallback, the last\n      // ResizeObserver's handler that runs because of the change in the layout is trying to\n      // access a dom node that is no longer there (as the fallback component is being shown instead).\n      // See https://github.com/mui/material-ui/issues/32640\n\n      if (inputRef.current) {\n        syncHeightWithFlushSycn();\n      }\n    });\n    const containerWindow = ownerWindow(inputRef.current);\n    containerWindow.addEventListener('resize', handleResize);\n    let resizeObserver;\n\n    if (typeof ResizeObserver !== 'undefined') {\n      resizeObserver = new ResizeObserver(handleResize);\n      resizeObserver.observe(inputRef.current);\n    }\n\n    return () => {\n      handleResize.clear();\n      containerWindow.removeEventListener('resize', handleResize);\n\n      if (resizeObserver) {\n        resizeObserver.disconnect();\n      }\n    };\n  });\n  useEnhancedEffect(() => {\n    syncHeight();\n  });\n  React.useEffect(() => {\n    renders.current = 0;\n  }, [value]);\n\n  const handleChange = event => {\n    renders.current = 0;\n\n    if (!isControlled) {\n      syncHeight();\n    }\n\n    if (onChange) {\n      onChange(event);\n    }\n  };\n\n  return /*#__PURE__*/_jsxs(React.Fragment, {\n    children: [/*#__PURE__*/_jsx(\"textarea\", _extends({\n      value: value,\n      onChange: handleChange,\n      ref: handleRef // Apply the rows prop to get a \"correct\" first SSR paint\n      ,\n      rows: minRows,\n      style: _extends({\n        height: state.outerHeightStyle,\n        // Need a large enough difference to allow scrolling.\n        // This prevents infinite rendering loop.\n        overflow: state.overflow ? 'hidden' : null\n      }, style)\n    }, other)), /*#__PURE__*/_jsx(\"textarea\", {\n      \"aria-hidden\": true,\n      className: props.className,\n      readOnly: true,\n      ref: shadowRef,\n      tabIndex: -1,\n      style: _extends({}, styles.shadow, style, {\n        padding: 0\n      })\n    })]\n  });\n});\nprocess.env.NODE_ENV !== \"production\" ? TextareaAutosize.propTypes\n/* remove-proptypes */\n= {\n  // ----------------------------- Warning --------------------------------\n  // | These PropTypes are generated from the TypeScript type definitions |\n  // |     To update them edit the d.ts file and run \"yarn proptypes\"     |\n  // ----------------------------------------------------------------------\n\n  /**\n   * @ignore\n   */\n  className: PropTypes.string,\n\n  /**\n   * Maximum number of rows to display.\n   */\n  maxRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n  /**\n   * Minimum number of rows to display.\n   * @default 1\n   */\n  minRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n  /**\n   * @ignore\n   */\n  onChange: PropTypes.func,\n\n  /**\n   * @ignore\n   */\n  placeholder: PropTypes.string,\n\n  /**\n   * @ignore\n   */\n  style: PropTypes.object,\n\n  /**\n   * @ignore\n   */\n  value: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.number, PropTypes.string])\n} : void 0;\nexport default TextareaAutosize;"],"mappings":";AAAA,OAAOA,QAAQ,MAAM,oCAAoC;AACzD,OAAOC,6BAA6B,MAAM,yDAAyD;AACnG,IAAMC,SAAS,GAAG,CAAC,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,CAAC;AACtE,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,SAAS,QAAQ,WAAW;AACrC,SAASC,iBAAiB,IAAIC,QAAQ,EAAEC,mBAAmB,IAAIC,UAAU,EAAEC,0BAA0B,IAAIC,iBAAiB,EAAEC,oBAAoB,IAAIC,WAAW,QAAQ,YAAY;AACnL,SAASC,GAAG,IAAIC,IAAI,QAAQ,mBAAmB;AAC/C,SAASC,IAAI,IAAIC,KAAK,QAAQ,mBAAmB;AAEjD,SAASC,aAAa,CAACC,aAAa,EAAEC,QAAQ,EAAE;EAC9C,OAAOC,QAAQ,CAACF,aAAa,CAACC,QAAQ,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC;AACnD;AAEA,IAAME,MAAM,GAAG;EACbC,MAAM,EAAE;IACN;IACAC,UAAU,EAAE,QAAQ;IACpB;IACAC,QAAQ,EAAE,UAAU;IACpB;IACAC,QAAQ,EAAE,QAAQ;IAClBC,MAAM,EAAE,CAAC;IACTC,GAAG,EAAE,CAAC;IACNC,IAAI,EAAE,CAAC;IACP;IACAC,SAAS,EAAE;EACb;AACF,CAAC;AAED,SAASC,OAAO,CAACC,GAAG,EAAE;EACpB,OAAOA,GAAG,KAAKC,SAAS,IAAID,GAAG,KAAK,IAAI,IAAIE,MAAM,CAACC,IAAI,CAACH,GAAG,CAAC,CAACI,MAAM,KAAK,CAAC;AAC3E;AAEA,IAAMC,gBAAgB,GAAG,aAAalC,KAAK,CAACmC,UAAU,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